<include file="Public:header" />
<load href="__JS__/upload/uploadify.css" />
<load href="__JS__/swfobject.js" />
<script type="text/javascript" src="__JS__/jquery.uploadify.v2.1.4.min.js"></script> 

<!--模糊查询js与css文件-->
<link type="text/css" rel="stylesheet" href="__JS__/jqueryUI/themes/base/jquery.ui.all.css" />
<script type="text/javascript" src="__JS__/jqueryUI/ui/jquery-ui.js"></script>	
<div class="content">
<!-----------------------------------------内容开始--------------------------------------------------->
<div class="infoBox">
<script>
</script>

<form name="form" action="{:U('doarticle')}" method="post" onsubmit="return checkform();">
<input type="hidden" name="id" value="{$id}" />

<style>
.infoBoxTd{width:15%;min-width:100px;}
.checkboxml{margin-left:10px;}
.fred{color:#CC0000;}
.zishutishi{width:400px;height:80px;line-height:80px;font-size:22px;padding:0px 40px;color:#f00;background:url(__PUBLIC__/images/btm_bg_hei.png) repeat;position:fixed;left:20%;top:20%;z-index:999;display:none;}
</style>

<table width="100%" border="0" cellpadding="0" cellspacing="0" id="basic">
<tr>
	<td class="infoBoxTd">大标：</td>
	<td colspan="2"><INPUT name="name" value="{$name}" class="formTitle xzzsinput" size="80" maxlength="30" onkeyup="word_count(30,this)" onblur="auto_save('name')" >您已输入<span class="fred ysrzs">0</span>字，还可输入<span class="fred syzs">30</span>字。</td>
</tr>

<tr>
	<td class="infoBoxTd">大标附注说明：</td>
	<td colspan="2"><INPUT name="namesm" value="{$namesm}" class="formTitle xzzsinput" size="80" maxlength="100" onkeyup="word_count(100,this)" onblur="auto_save('namesm')" >您已输入<span class="fred ysrzs">0</span>字，还可输入<span class="fred syzs">100</span>字。</td>
</tr>

<tr>
	<td class="infoBoxTd">主图区图片：</td>
	<td  colspan="2">
		<img id="zhutu" src="<neq name='zhutu' value=''>{$zhutu}<else/>__PUBLIC__/images/nopic.gif</neq>" width="280" height="70" style="float:left;margin-right:20px;" />
		<div class="upimg-box"><div id="fileQueue"></div>
		<input id="file_upload_zhutu" type="file" /><input name="zhutu" type="hidden" value="{$zhutu}" onblur="auto_save('zhutu')" /></div>
	</td>
</tr>

<tr>
    <td class="infoBoxTd" >文章内容：</td>
    <td colspan="2">
		<textarea id="content" name="content" style="width:800px;height:300px;" onblur="auto_save('content')">{$content|stripslashes}</textarea>
		<div>
			您已输入<span id="word_count1" class="fred">0</span>字，还可输入<span id="word_yu1" class="fred">3000</span>字。最多上传<span class="fred">20</span>张图。
		</div>
		<div class="zishutishi" id="zishutishi1"></div>
	</td>
</tr>

<tr>
	<td class="infoBoxTd">photo相片：</td>
	<td colspan="2"><a href="javascript:;" onclick="show_photo_up()" class="buttom">编辑相片</a></td>
</tr>
<script type="text/javascript">
	function show_photo_up(){
		var id=$("input[name='id']").val();
		if(id){
			var url="{:U('Content/art_photo_files',array(aid=>$id))}";
			location.href=url;
		}else{
			alert("请先填写其它信息！");
			return false;
		}
	}
	function show_video_up(){
		var id=$("input[name='id']").val();
		if(id){
			var url="{:U('Content/art_video',array(aid=>$id))}";
			location.href=url;
		}else{
			alert("请先填写其它信息！");
			return false;
		}
	}
</script>
<tr>
	<td class="infoBoxTd">video视频：</td>
	<td colspan="2"><a href="javascript:;" onclick="show_video_up()" class="buttom">编辑视频</a></td>
</tr>

<tr>
    <td class="infoBoxTd">地点信息：</td>
    <td colspan="2">
		<textarea id="areainf" name="areainf" style="width:800px;height:300px;" onblur="auto_save('areainf')">{$areainf|stripslashes}</textarea>
		<div>
			您已输入<span id="word_count2" class="fred">0</span>字，还可输入<span id="word_yu2" class="fred">1000</span>字。最多上传<span class="fred">5</span>张图。
		</div>
		<div class="zishutishi" id="zishutishi2"></div>
	</td>
</tr>

<tr>
    <td class="infoBoxTd">备注信息：</td>
    <td colspan="2">
		<textarea id="remark" name="remark" style="width:800px;height:300px;" onblur="auto_save('remark')">{$remark|stripslashes}</textarea>
		<div>
			您已输入<span id="word_count3" class="fred">0</span>字，还可输入<span id="word_yu3" class="fred">1000</span>字。最多上传<span class="fred">5</span>张图。
		</div>
		<div class="zishutishi" id="zishutishi3"></div>
	</td>
</tr>

<tr style="display:none;">
    <td class="infoBoxTd">常见Q&A000 ：</td>
    <td colspan="2"><textarea id="qa000" name="qa000" style="width:800px;height:300px;" >{$qa000|stripslashes}</textarea></td>
</tr>

<tr>
    <td class="infoBoxTd">常见Q&A ：</td>
    <td colspan="2">
		<textarea id="qa" name="qa" style="width:800px;height:300px;" onblur="auto_save('qa')">{$qa|stripslashes}</textarea>
		<div>
			您已输入<span id="word_count4" class="fred">0</span>字，还可输入<span id="word_yu4" class="fred">4000</span>字。最多上传<span class="fred">5</span>张图。
		</div>
		<div class="zishutishi" id="zishutishi4"></div>
	</td>
</tr>

<tr>
    <td class="infoBoxTd">服务概要：</td>
    <td colspan="2">
		<textarea id="service_out" name="service_out" style="width:800px;height:300px;" onblur="auto_save('service_out')">{$service_out|stripslashes}</textarea>
		<div>
			您已输入<span id="word_count5" class="fred">0</span>字，还可输入<span id="word_yu5" class="fred">1000</span>字。最多上传<span class="fred">5</span>张图。
		</div>
		<div class="zishutishi" id="zishutishi5"></div>
	</td>
</tr>

<tr>
    <td class="infoBoxTd">服务内容：</td>
    <td colspan="2">
		<textarea id="service" name="service" style="width:800px;height:300px;" onblur="auto_save('service')">{$service|stripslashes}</textarea>
		<div>
			您已输入<span id="word_count6" class="fred">0</span>字，还可输入<span id="word_yu6" class="fred">1000</span>字。最多上传<span class="fred">5</span>张图。
		</div>
		<div class="zishutishi" id="zishutishi6"></div>
	</td>
</tr>

<tr style="display:none;">
    <td class="infoBoxTd">服务套餐000：</td>
    <td colspan="2"><textarea id="service_pack000" name="service_pack000" style="width:800px;height:300px;">{$service_pack000|stripslashes}</textarea></td>
</tr>

<tr>
    <td class="infoBoxTd">服务套餐：</td>
    <td colspan="2">
		<textarea id="service_pack" name="service_pack" style="width:800px;height:300px;" onblur="auto_save('service_pack')">{$service_pack|stripslashes}</textarea>
		<div>
			您已输入<span id="word_count7" class="fred">0</span>字，还可输入<span id="word_yu7" class="fred">500</span>字。最多上传<span class="fred">5</span>张图。
		</div>
		<div class="zishutishi" id="zishutishi7"></div>
	</td>
</tr>
<script>
$(document).ready(function(){
　　$("input[name='area_ids']").on("click",function(){
		var gids = new Array();
		$.each($("input[name='area_ids']:checked"), function(i, n){
			gids.push( $(n).val() );
		});
		var ids=gids.toString();
		$('#area_id').val(ids);
　　});
　　$("input[name='menuids']").on("click",function(){
		var gids = new Array();
		var gnames=new Array();
		$.each($("input[name='menuids']:checked"), function(i, n){
			gids.push($(n).val());
			var menu_name=$(this).parent().find("span.menu_name").text();
			gnames.push(menu_name);
			
		});
		$.each($("input[name='menurids']"), function(){
			if(gnames.indexOf($(this).parent().find("span.menu_name").text())==-1){
				$(this).attr('disabled','disabled');
				$(this).removeAttr("checked");
				pan_menurids();
			}else{
				$(this).removeAttr("disabled"); ;
			}
		});
		$.each($("input[name='menulids']"), function(){
			if(gnames.indexOf($(this).parent().find("span.menu_name").text())==-1){
				$(this).attr('disabled','disabled');
				$(this).removeAttr("checked");
				pan_menulids();
			}else{
				$(this).removeAttr("disabled"); ;
			}
		});
		
		var ids=gids.toString();
		$('#menuid').val(ids);
　　});
　　$("input[name='menurids']").on("click",function(){
		var gids = new Array();
		$.each($("input[name='menurids']:checked"), function(i, n){
			gids.push( $(n).val() );
		});
		var ids=gids.toString();
		$('#menurid').val(ids);
　　});
　　$("input[name='menulids']").on("click",function(){
		var gids = new Array();
		$.each($("input[name='menulids']:checked"), function(i, n){
			gids.push( $(n).val() );
		});
		var ids=gids.toString();
		$('#menulid').val(ids);
　　});
		//页面载入时判断分类项目
		var gnamess=new Array();
		$.each($("input[name='menuids']:checked"), function(){
			var menu_name=$(this).parent().find("span.menu_name").text();
			gnamess.push(menu_name);
			
		});
		$.each($("input[name='menurids']"), function(){
			if(gnamess.indexOf($(this).parent().find("span.menu_name").text())==-1){
				$(this).attr('disabled','disabled');
			}else{
				$(this).removeAttr("disabled"); ;
			}
		});
		$.each($("input[name='menulids']"), function(){
			if(gnamess.indexOf($(this).parent().find("span.menu_name").text())==-1){
				$(this).attr('disabled','disabled');
			}else{
				$(this).removeAttr("disabled"); ;
			}
		});

});
function pan_menurids(){
	var gids = new Array();
	$.each($("input[name='menurids']:checked"), function(i, n){
		gids.push( $(n).val() );
	});
	var ids=gids.toString();
	$('#menurid').val(ids);
}
function pan_menulids(){
	var gids = new Array();
	$.each($("input[name='menulids']:checked"), function(i, n){
		gids.push( $(n).val() );
	});
	var ids=gids.toString();
	$('#menulid').val(ids);
}
</script>
<tr>
    <td class="infoBoxTd">区域：</td>
    <td colspan="2">
		<input type="hidden" name="area_id" id="area_id" value="{$area_id}" />
		<volist name="areas" id="areas">
			<input type="checkbox" name="area_ids" value="{$areas.id}" class="checkboxml" <in name="areas.id" value="$area_id">checked</in> />{$areas.name} 
		</volist>
	</td>
</tr>

<tr>
    <td class="infoBoxTd">婚嫁分类项目：</td>
    <td colspan="2">
		<input type="hidden" name="menuid" id="menuid" value="{$menuid}" />
		<volist name="menus" id="menus">
			<span><input type="checkbox" name="menuids" value="{$menus.id}" class="checkboxml" <in name='menus.id' value='$menuid'>checked</in> /><span class="menu_name">{$menus.name}</span></span> 
		</volist>
	</td>
</tr>

<tr>
    <td class="infoBoxTd">游标广告-右：</td>
    <td colspan="2">
		<input type="hidden" name="menurid" id="menurid" value="{$menurid}" />
		<volist name="menusr" id="menusr">
			<span><input type="checkbox" name="menurids" value="{$menusr.nid_r}" class="checkboxml" <in name='menusr.nid_r' value='$menurid'>checked</in> /><span class="menu_name">{$menusr.name}</span></span> 
		</volist>
	</td>
</tr>

<tr>
    <td class="infoBoxTd">游标广告-左：</td>
    <td colspan="2">
		<input type="hidden" name="menulid" id="menulid" value="{$menulid}" />
		<volist name="menusl" id="menusl">
			<span><input type="checkbox" name="menulids" value="{$menusl.nid_l}" class="checkboxml" <in name='menusl.nid_l' value='$menulid'>checked</in> /><span class="menu_name">{$menusl.name}</span></span>  
		</volist>
	</td>
</tr>
<script type="text/javascript">
//模糊查询js

(function( $ ) {
	$.widget( "custom.combobox", {
		_create: function() {
			this.wrapper = $( "<span>" ).addClass( "custom-combobox" ).insertAfter( this.element );
			this.element.hide();
			this._createAutocomplete();
			this._createShowAllButton();
		},
   
		_createAutocomplete: function() {
		    var selected = this.element.children( ":selected" ),
			value = selected.val() ? selected.text() : "";
			
			this.input = $("<input>").appendTo( this.wrapper ).val( value ).attr( "title", "" ).addClass( "custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left" ).autocomplete({
				delay: 0,
				minLength: 0,
				source: $.proxy( this, "_source" )
			}).tooltip({
			 	tooltipClass: "ui-state-highlight"
			});
			
			this._on( this.input, {
				autocompleteselect: function( event, ui ) {
			  		ui.item.option.selected = true;
			  		this._trigger( "select", event, {
						item: ui.item.option
			  		});
				},autocompletechange: "_removeIfInvalid"
		  	});
		},
   
		_createShowAllButton: function() {
			var input = this.input,
			wasOpen = false;
			
			$( "<a>" ).attr( "tabIndex", -1 ).attr( "title", "选择" ).tooltip().appendTo( this.wrapper ).button({
				icons: {primary: "ui-icon-triangle-1-s"},
			  	text: false
			}).removeClass( "ui-corner-all" ).addClass( "custom-combobox-toggle ui-corner-right" ).mousedown(function() {
			  	wasOpen = input.autocomplete( "widget" ).is( ":visible" );
			}).click(function() {
				input.focus();
				
				// Close if already visible
				if ( wasOpen ) {
				  return;
				}
   
				// Pass empty string as value to search for, displaying all results
				input.autocomplete( "search", "" );
			});
		},
   
		_source: function( request, response ) {
			var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
			response( this.element.children( "option" ).map(function() {
				var text = $( this ).text();
				if ( this.value && ( !request.term || matcher.test(text) ) )
			  	return {
					label: text,
					value: text,
					option: this
			  	};
		  	}));
		},
   
		_removeIfInvalid: function( event, ui ) {
   
			// Selected an item, nothing to do
			if ( ui.item ) {//console.log(ui.item);
				this._trigger("afterInvalid",null,ui.item.value);
				return;
			}
   
			// Search for a match (case-insensitive)
			var value = this.input.val(),
				valueLowerCase = value.toLowerCase(),
				valid = false;
			this.element.children( "option" ).each(function() {
				if ( $( this ).text().toLowerCase() === valueLowerCase ) {
					this.selected = valid = true;
					return false;
				}
			});
   
			// Found a match, nothing to do
			if ( valid ) {
				this._trigger("afterInvalid",null,value);
				return;
			}
   
			// Remove invalid value
			this.input.val( "" ).attr( "title", value + "" ).tooltip( "open" );
			this.element.val( "" );
			this._delay(function() {
				this.input.tooltip( "close" ).attr( "title", "" );
			}, 2500 );
			this.input.data( "ui-autocomplete" ).term = "";
		},
   
		_destroy: function() {
			this.wrapper.remove();
			this.element.show();
		}
	});
})( jQuery );
</script>
<style type="text/css">
/* 模糊查询样式配置 */
.custom-combobox-toggle {
	height: 24px;
	margin:0 0 0 -1px;
	padding: 0;
	/* support: IE7 */
	*height: 1.7em;
	*top: 0.1em;
}
.custom-combobox-input {
	margin: 0;
	padding: 0.3em;width:166px;
}
.ui-autocomplete{height:200px;overflow:auto;}
.sort{color:#0663A2;cursor:pointer;}
.custom-combobox input[type="text"]{height:26px;width:166px;}

.shopids{padding-left:20px;padding-right:10px;}
.shop_btn{background:url(__PUBLIC__/images/toolsDel.png) no-repeat center center;cursor:pointer;width:16px;height:16px;display:inline-block;}
</style>

<tr>
    <td class="infoBoxTd">所属商家：</td>
    <td colspan="2">
		<input type="hidden" name="shopid" id="shopid" value="{$shopid}" />
		<select name="shopids">
			<option value="0">请选择</option>
			<volist name="shop" id="shop">
			<option value="{$shop.id}">{$shop.name}</option>
			</volist>
		</select>
		<volist name="sshop" id="sshop">
			<span class="shopids">
				<input type="hidden" class="shopid" value="{$sshop.id}" />
				<span class="shopname">{$sshop.name}</span>
				<span class="shop_btn" onclick="del_shopid(this)"></span>
			</span>
		</volist>
	</td>
</tr>
<script type="text/javascript">
//模糊查询 引入
$("select[name='shopids']" ).combobox();
//$("select[name='shopids']" ).toggle();

function push_shopid(obj){
	alert($('.custom-combobox-input').val());
	var shopid=$(obj).val();
	var shopname=$(obj).find("option:selected").text();
	
}
$(document).ready(function(){
	//添加选中的商家
	$("input.custom-combobox-input").on("blur",function(){
		var obj=$("select[name='shopids']");
		var shopid=obj.val();
		var shopname=obj.find("option:selected").text();
		$(this).parent().after('<span class="shopids"><input type="hidden" class="shopid" value="'+shopid+'" /><span class="shopname">'+shopname+'</span><span class="shop_btn" onclick="del_shopid(this)"></span></span>');
		var gids = new Array();
		$.each($("input.shopid"), function(i, n){
			gids.push( $(n).val() );
		});
		var ids=gids.toString();
		$('#shopid').val(ids);
	});
});
//删除选中的商家
function del_shopid(obj){
	$(obj).parent().remove();
	var gids = new Array();
	$.each($("input.shopid"), function(i, n){
		gids.push( $(n).val() );
	});
	var ids=gids.toString();
	$('#shopid').val(ids);
}
</script>
<tr>
	<td class="infoBoxTd">上刊时间：</td>
	<td colspan="2"><gt name="ctime" value="0">{$ctime|date='Y-m-d H:i:s',###}</gt></td>
</tr>

<tr>
	<td class="infoBoxTd">上次修改时间：</td>
	<td colspan="2"><gt name="stime" value="0">{$stime|date='Y-m-d H:i:s',###}</gt></td>
</tr>

<tr>
	<td class="infoBoxTd">被阅读次数：</td>
	<td colspan="2">{$reads}</td>
</tr>

<tr>
	<td class="infoBoxTd">被关注次数：</td>
	<td colspan="2">{$follows}</td>
</tr>

</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="infoBoxTd">&nbsp;</td>
<td align="left"><input type="submit" name="Button1" value="保存" class="formInput01" /></td>
</tr>
</table>
</form>
</div>
<!-----------------------------------------内容结束--------------------------------------------------->
</div>
    

<include file="Public:footer" />
<script type="text/javascript">
//字数限制js

function word_count(t,obj){
	var wordleng=$(obj).val().length;
	var syzs=t-wordleng;
	$(obj).parent().find('span.ysrzs').text(wordleng);
	$(obj).parent().find('span.syzs').text(syzs);
}
$(document).ready(function(){
	$("input.xzzsinput").each(function(){
		var wordleng=$(this).val().length;
		var syzs=$(this).parent().find('span.syzs').text()-wordleng;
		$(this).parent().find('span.ysrzs').text(wordleng);
		$(this).parent().find('span.syzs').text(syzs);
	});
	
});
//编辑器
var k1; //文章内容
KindEditor.ready(function(K) {
	k1 = K.create('#content', {
		allowFileManager : true,
		afterChange : function() {
			K('#word_count1').html(this.count('text'));
			$('#word_yu1').html(3000-this.count('text'));
			if(this.count('text')>3000){
				$("#zishutishi1").show();
				$("#zishutishi1").text("超出字数限制！无法保存！");
			}else{
				$("#zishutishi1").hide();
				$("#zishutishi1").text("");
			}
		}
	});
});
var k2; //地点信息
KindEditor.ready(function(K) {
	k2 = K.create('#areainf', {
		allowFileManager : true,
		afterChange : function() {
			K('#word_count2').html(this.count('text'));
			$('#word_yu2').html(1000-this.count('text'));
			if(this.count('text')>1000){
				$("#zishutishi2").show();
				$("#zishutishi2").text("超出字数限制！无法保存！");
			}else{
				$("#zishutishi2").hide();
				$("#zishutishi2").text("");
			}
		}
	});
});

var k3; //备注信息
KindEditor.ready(function(K) {
	k3 = K.create('#remark', {
		allowFileManager : true,
		afterChange : function() {
			K('#word_count3').html(this.count('text'));
			$('#word_yu3').html(1000-this.count('text'));
			if(this.count('text')>1000){
				$("#zishutishi3").show();
				$("#zishutishi3").text("超出字数限制！无法保存！");
			}else{
				$("#zishutishi3").hide();
				$("#zishutishi3").text("");
			}
		}
	});
});

var k400; //常见QA000
KindEditor.ready(function(K) {
	k400 = K.create('#qa000', {
		allowFileManager : true
	});
});

var k4; //常见QA
KindEditor.ready(function(K) {
	k4 = K.create('#qa', {
		allowFileManager : true,
		afterChange : function() {
			K('#word_count4').html(this.count('text'));
			$('#word_yu4').html(4000-this.count('text'));
			if(this.count('text')>4000){
				$("#zishutishi4").show();
				$("#zishutishi4").text("超出字数限制！无法保存！");
			}else{
				$("#zishutishi4").hide();
				$("#zishutishi4").text("");
			}
		}
	});
});

var k5; //服务概要
KindEditor.ready(function(K) {
	k5 = K.create('#service_out', {
		allowFileManager : true,
		afterChange : function() {
			K('#word_count5').html(this.count('text'));
			$('#word_yu5').html(1000-this.count('text'));
			if(this.count('text')>1000){
				$("#zishutishi5").show();
				$("#zishutishi5").text("超出字数限制！无法保存！");
			}else{
				$("#zishutishi5").hide();
				$("#zishutishi5").text("");
			}
		}
	});
});

var k6; //服务内容
KindEditor.ready(function(K) {
	k6 = K.create('#service', {
		allowFileManager : true,
		afterChange : function() {
			K('#word_count6').html(this.count('text'));
			$('#word_yu6').html(1000-this.count('text'));
			if(this.count('text')>1000){
				$("#zishutishi6").show();
				$("#zishutishi6").text("超出字数限制！无法保存！");
			}else{
				$("#zishutishi6").hide();
				$("#zishutishi6").text("");
			}
		}
	});
});

var k7000; //服务套餐000
KindEditor.ready(function(K) {
	k7000 = K.create('#service_pack000', {
		allowFileManager : true
	});
});

var k7; //服务套餐
KindEditor.ready(function(K) {
	k7 = K.create('#service_pack', {
		allowFileManager : true,
		afterChange : function() {
			K('#word_count7').html(this.count('text'));
			$('#word_yu7').html(500-this.count('text'));
			if(this.count('text')>500){
				$("#zishutishi7").show();
				$("#zishutishi7").text("超出字数限制！无法保存！");
			}else{
				$("#zishutishi7").hide();
				$("#zishutishi7").text("");
			}
		}
	});
});

//图片上传
$("#file_upload_zhutu").uploadify({
		'uploader'       : '__JS__/swf/uploadify.swf',
		'script'         : '__JS__/upload/uploadify.php',
		'cancelImg'      : '__JS__/upload/cancel.png',
		'folder'         : 'data/zhutu',
		'queueID'        : 'fileQueue',
		'sizeLimit'      :	2 * 1000 * 1024,
		'fileExt'        : '*.jpg;*.gif;*.png;', //允许文件上传类型,和fileDesc一起使用.
		'fileDesc'       : '*.jpg;*.gif;*.png;',  //选择文件对话框中的提示文本.
		'auto'           : true,
		'multi'          : false,	
		'onComplete':function(event,queueId,fileObj,response,data){
			$('input[name="zhutu"]').val(response);
			$('#zhutu').attr('src', response);
		}
});

//自动保存
function auto_save(obj){
	var con=$("input[name='"+obj+"']").val();
	var id=$("input[name='id']").val();
	if($(obj).parent().parent().find('div.zishutishi').text()!=''){
		return false;exit;
	}
	$.post("{:U('Content/auto_save_article')}", {obj:obj,con:con,id:id}, function(v){
		if( v>0 ){
			if(id){
				ui.success('自动保存成功！');
			}else{
				$("input[name='id']").val(v);
				var url="./admin.php?a=editarticle&m=content&id="+v+"";
				location.href=url;
			}
		}else{
			//ui.error('自动保存失败！');
		}
	});
}
function checkform(){
	if($('.zishutishi').text()!=''){
		return false;exit;
	}
}
</script>
